package com.camera2.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;



public class FramentTake extends Fragment {
    @Nullable

    private View view;
//    @Override
//    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//        return LayoutInflater.from(getActivity()).inflate(R.layout.fragment2, container, false);
//    }

    @Override
    public View onCreateView(LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment2, null);
        view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        Intent intent = new Intent(getContext(), TakePicture.class);
        startActivity(intent);

        return view;

    }
//    @Override
//    public void onResume(){
//        super.onResume();
//        Intent intent = new Intent(getContext(), MainActivity.class);
//        startActivity(intent);
//    }

}
